//获取环境变量
console.log("环境变量",import.meta.env)

//加载JS
import count from './count'
console.log('countNum --> ',count.countNum)

//加载CSS
import './variable.css'
import './src/components/componentA/index.js'
import './src/components/componentB/index.js'

//加载JOSN
import json from './src/assets/json'
console.log(json) //输出的是对象。{name: 'hedaoda0', age: 20}

import {name} from './src/assets/json'
console.log(name)  //hedaodao


//加载图片 
//vite配置： resolve:{alias: {"@":path.resolve(__dirname,'./src')}}
//就可以用@别名替代src目录了
import flag from '@/assets/images/flag.png'
let img=document.createElement('img')
img.src=flag
document.body.append(img)


//加载svg：
import loading from '@/assets/images/loading.svg' //默认会追加url ===> @/assets/images/loading.svg?url
let svgImg=document.createElement('img')
svgImg.src=loading
document.body.append(svgImg)




